package com.rocksdata.mc.entity;

import com.rocksdata.mc.R;

/**
 * Created by 陈堂正 on 2017/5/11.
 */

public class WidgetInfo {
    public static final int TYPE_BANNER = 0;
    public static final int TYPE_APP = 1;
    public static final int TYPE_ANNOUNCEMENT = 2;
    public static final int TYPE_TIMETABLE = 3;
    public static final int TYPE_MEETING = 4;
    public static final int TYPE_EMAIL = 5;
    public static final int TYPE_CAMPUS_CARD = 6;
    public static final int TYPE_NEWS = 7;
    public static final int TYPE_WIDGET_MANAGER = 8;

    public int type;
    public int icon;
    public String name;

    public WidgetInfo(int type){
        this.type = type;
        switch(type){
            case TYPE_APP:
                name = "应用";
                break;
            case TYPE_ANNOUNCEMENT:
                name = "通知";
                icon = R.mipmap.ic_widget_announcement;
                break;
            case TYPE_TIMETABLE:
                name = "上课";
                icon = R.mipmap.ic_widget_timetable;
                break;
            case TYPE_MEETING:
                name = "会议";
                icon = R.mipmap.ic_widget_meeting;
                break;
            case TYPE_EMAIL:
                name = "邮件";
                icon = R.mipmap.ic_widget_email;
                break;
            case TYPE_CAMPUS_CARD:
                name = "一卡通";
                icon = R.mipmap.ic_widget_campus_card;
                break;
            case TYPE_NEWS:
                name = "新闻";
                icon = R.mipmap.ic_widget_news;
                break;
            case TYPE_WIDGET_MANAGER:
                name = "管理";
                break;
        }
    }
}
